/*
*   给组件调用的接口API
*
*  */
import http from "./http";

export const getZoneList = (pageNum, pageSize, params) => {
    return http.request({
        url: "/api/zone/" + pageNum + '/' + pageSize,
        method: "get",
        params: params,
        headers: {
            Authorization: localStorage.getItem('token')
        }
    });
}

export const addZone = (params) => {
    return http.request({
        url: "/api/zone",
        method: "post",
        data: params,
        headers: {
            Authorization: localStorage.getItem('token')
        }
    });
}

export const updateZone = (params) => {
    return http.request({
        url: "/api/zone",
        method: "put",
        data: params,
        headers: {
            Authorization: localStorage.getItem('token')
        }
    });
}

export const deleteZone = (id) => {
    return http.request({
        url: "/api/zone/" + id,
        method: "delete",
        headers: {
            Authorization: localStorage.getItem('token')
        }
    });
}